This repository has been archived by the owner on Oct 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 221
Add appendToEntries
to allow outside sources to add to the final entries object before compilation
#1932
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dahukish
force-pushed
the
beta-magic-entries
branch
from
June 4, 2021 18:04
1a43bfc
to
49c4d16
Compare
dahukish
changed the title
WIP
Add callback function to allow outside sources to add to the final entries object before compilation
Jun 4, 2021
dahukish
changed the title
Add callback function to allow outside sources to add to the final entries object before compilation
Add Jun 7, 2021
appendToEntries
to allow outside sources to add to the final entries object before compilation
dahukish
commented
Jun 8, 2021
marutypes
approved these changes
Jun 8, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't tophatted but code and approach checks out to me. Would like a bit of documentation around the new callback but otherwise 👍
packages/magic-entries-webpack-plugin/src/magic-entries-webpack-plugin.ts
Outdated
Show resolved
Hide resolved
const name = 'node-virtual-module-entrypoints'; | ||
await withWorkspace(name, async ({workspace}) => { | ||
await workspace.write('index.js', ENTRY_A); | ||
await workspace.write('cats.js', CATS_MODULE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐱 🐈
vsumner
approved these changes
Jun 8, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code makes sense. +1 to what @TheMallen said about documentation.
dahukish
force-pushed
the
beta-magic-entries
branch
from
June 8, 2021 18:38
e548e1c
to
9949d64
Compare
dahukish
force-pushed
the
beta-magic-entries
branch
from
June 8, 2021 18:39
9949d64
to
f18ac34
Compare
shopify-shipit
bot
had a problem deploying
to
production-graphql-mini-transforms-webpack-5
June 17, 2021 20:37
Failure
shopify-shipit
bot
deployed
to
production-graphql-mini-transforms-webpack-5
June 17, 2021 21:25
Active
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Essentially we need a way to expose the final entries generated by this plugin without exposing to much or have to know about anything besides entries. The new callback allows the entries to still be passed to webpack while allowing for optional final edits before compilation. This is currently needed to support HMR properly using sewing-kit.
Related: https://github.com/Shopify/sewing-kit/pull/2686
Type of change
Checklist